whenRange = ["at the beginning of the frame", "at the end of the frame"]
else
whenDefault = "when the mouse clicks on the sprite"
whenRange = ["when the sprite first appears", "when the sprite leaves the stage", "when the mouse clicks on the sprite", "when the mouse button is released over the sprite", "when the cursor moves over the sprite", "when the cursor moves off of the sprite"]
end if
props[#playWhen] = [#comment: "When to play sound", #format: #string, #default: whenDefault, #range: whenRange]
return "Plays a sound based on a frame or sprite event."
end
on getBehaviorDescription me
return "PLAY SOUND" & RETURN & RETURN & "Drop this behavior onto a sprite, the Stage, or the Script channel of the Score to play a sound based on the movement of the playback head or cursor." & RETURN & RETURN & "When used in the Script channel, this behavior can play the sound when the playback head enters or leaves the frame. " & "With sprites, the behavior can react to the beginning or end of the sprite, or to mouse events. " & "Choose a sound, a sound channel, an event to trigger the sound and how many times the sound should play." & RETURN & RETURN & "PARAMETERS:" & RETURN & "* Sound to play - cast member used by behavior" & RETURN & "* Sound channel - which channel to use for playback" & RETURN & "* When to play sound - event to trigger sound" & RETURN & "* Number of loops - how many times sound plays (0 = forever)"